/**
 * 
 */
package burhan.bean;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Burhan
 *
 */
public class NotificationBean {
	/** instance variables **/
	List<String> errors;	
	
	/**
	 * 
	 */
	public NotificationBean() {
		errors = new ArrayList<String>();
	}
	/**
	 * @return the errors
	 */
	public List<String> getErrors() {
		return errors;
	}
	
	public String getNotificationsHTML(){
		String r = "<ul class=\"error\">";
		for(String item : errors){
			r += "<li>"+item+"</li>";
		}
		r += "</ul>";
		return r;
	}
	/**
	 * @param errors the errors to set
	 */
	public void addError(String msg) {
		this.errors.add(msg);
	}
	/**
	 * @return the count
	 */
	public int getErrorCount() {
		return errors.size();
	}
	
	
}
